<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>制度列表</title>
<link type="text/css" rel="stylesheet" href="${css_ctx }/main_style.css" />
<script type="text/javascript" src="${ctx }/common/js/proving.js"></script>
<script language="javascript"> 
<!-- 
/*屏蔽所有的js错误*/ 
function killerrors() { 
return true; 
} 
window.onerror = killerrors; 
//--> 
</script> 

<script type="text/javascript" language="javascript">
 function submitMyFrom(path){
  document.getElementById('form1').action=path;
  document.getElementById('form1').submit();
 }
</script>
</head>

<body class="content_bg1">

<!-- 标题-->	
<div class="content_tittle">
<c:if test="${!empty content_tittle}">
	${content_tittle}
	<c:remove var="content_tittle" scope="session"/>
</c:if>
</div>
<!--  标题  end-->	

<!-- 提示信息 -->	
<c:if test="${!empty msg}">
	<div class="mag">提示信息：${msg}</div>
	<c:remove var="msg" scope="session"/>
</c:if>
<!-- 提示信息  end-->	

<div class="list_top">
<!-- 查询导出 -->
<form method="post" id="form1" name="form1">
<input type="button" value="《站细》目录条款添加" class="btn1_mouseout" onmouseover="this.className='btn1_mouseover'" onmouseout="this.className='btn1_mouseout'" onclick="submitMyFrom('${ctx }/rules?cmd=adding_main')"/>&nbsp;&nbsp;
<font color="red">【点击下面目录展开，可查看下一级】</font>
</form>
<!-- 查询导出  end-->
</div>
<script type="text/javascript" language="javascript">
function showTree(id){
	
	var objBranch = document.getElementById(id).style;
	var objBranchbg = document.getElementById("tree" + id).style;  
	if (objBranch.display=="block") {
		objBranchbg.backgroundImage="url(${img_ctx }/closed2.gif)";
		objBranch.display="none"; 
	} else {
		objBranchbg.backgroundImage="url(${img_ctx }/open2.gif)";
		objBranch.display="block"; swapFolder(branch); 
	}
}
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree_tab">
	<tr>
		<td width="60%" height="25" style="background-color: #b1dcf7">
			&nbsp;&nbsp;&nbsp;&nbsp;<strong>章节名称</strong>
		</td>
	
		<td style="background-color: #b1dcf7">
			&nbsp;&nbsp;&nbsp;&nbsp;<strong>明细</strong>
		</td>
	</tr>
	<c:if test="${!empty navlist}">
	
	<c:forEach items="${navlist}" var="nav1" varStatus="status1"> 
	  <tr >
			<td width="60%" height="25" class="b_td" id="tree${nav1.rule.rid}">
				<a href="#" onmousedown="showTree(${nav1.rule.rid})" >${nav1.rule.rname}</a>
			</td>
			<td class="b_td2">
				<img src="${img_ctx }/001.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=adding_nav&rlevel=1&pid=${nav1.rule.rid}">添加子类</a>
				&nbsp;|&nbsp;
			    <img src="${img_ctx }/001.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=adding&pid=${nav1.rule.rid}">添加条目</a>
				&nbsp;|&nbsp; 
				<img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update_nav&rid=${nav1.rule.rid}">修改</a>
				&nbsp;|&nbsp;
				<img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete_nav&rid=${nav1.rule.rid}" onclick="return del();">删除</a>
			</td>
		</tr>
	  <tr>
	  <td colspan="2">
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="${nav1.rule.rid}" class="tree_branch">
	  <c:forEach items="${nav1.ruleList}" var="nav2" varStatus="status2">
	      <c:if test="${nav2.rule.rlevel eq '4'}">
	       <tr>		
						<td width="60%" height="25" class="b_td_doc" >
							<a href="${ctx }/rules?cmd=update&rid=${nav2.rule.rid}">${nav2.rule.rname}</a>
						</td>
						<td class="b_td2"  style="background-color: #fff;">
						 <img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update&rid=${nav2.rule.rid}">修改</a>
						 &nbsp;|&nbsp;
						 <img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete&rid=${nav2.rule.rid}" onclick="return del();">删除</a>
						</td>
		  </tr>
		  </c:if>
		  <c:if test="${nav2.rule.rlevel ne '4'}">
		   <tr>	
				<td width="60%" height="25" style="background-color: #fff;background-position: 15px 7px; padding-left: 30px;" class="b_td" id="tree${nav2.rule.rid}">
					<a href="#" onmousedown="showTree(${nav2.rule.rid})" >${nav2.rule.rname}</a>
				</td>
				<td style="background-color: #fff;" class="b_td2"> 
					<img src="${img_ctx }/001.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=adding_nav&rlevel=2&pid=${nav2.rule.rid}">添加子类</a>
					&nbsp;|&nbsp; 
					<img src="${img_ctx }/001.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=adding&pid=${nav2.rule.rid}">添加条目</a>
					&nbsp;|&nbsp;
					<img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update_nav&rid=${nav2.rule.rid}">修改</a>
					&nbsp;|&nbsp; 
					<img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete_nav&rid=${nav2.rule.rid}" onclick="return del();">删除</a>
				</td>
			</tr>
		   </c:if>
		   <tr>
		  <td colspan="2">
		  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="${nav2.rule.rid}" class="tree_branch">
		  <c:forEach items="${nav2.ruleList}" var="nav3" varStatus="status3">
		    <c:if test="${nav3.rule.rlevel eq '4'}">
	           <tr>		
						<td width="60%" height="25" class="b_td_doc" >
							<a href="${ctx }/rules?cmd=update&rid=${nav3.rule.rid}">${nav3.rule.rname}</a>
						</td>
						<td class="b_td2"  style="background-color: #fff;">
						 <img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update&rid=${nav3.rule.rid}">修改</a>
						 &nbsp;|&nbsp;
						 <img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete&rid=${nav3.rule.rid}" onclick="return del();">删除</a>
						</td>
		      </tr>
		     </c:if>
		     <c:if test="${nav3.rule.rlevel ne '4'}">
			  <tr>
				<td width="60%" height="25" style="background-color: #fff;background-position: 25px 7px; padding-left:40px;" class="b_td" id="tree${nav3.rule.rid}">
					<a href="#" onmousedown="showTree(${nav3.rule.rid})" >${nav3.rule.rname}</a>
				</td>
				<td class="b_td2" style="background-color: #fff;">
						<img src="${img_ctx }/001.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=adding&pid=${nav3.rule.rid}">添加条目</a>
						&nbsp;|&nbsp; 
						<img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update_nav&rid=${nav3.rule.rid}">修改</a>
						&nbsp;|&nbsp;
						<img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete_nav&rid=${nav3.rule.rid}" onclick="return del();">删除</a>
				</td>
			 </tr>
			 </c:if>
			  <tr>
		 	 <td colspan="2">
		  	<table width="100%" border="0" cellpadding="0" cellspacing="0" id="${nav3.rule.rid}" class="tree_branch">
		      <c:forEach items="${nav3.rules}" var="rule" varStatus="status4">
		        	<tr>		
						<td width="70%" height="25" class="b_td_doc" >
							<a href="${ctx }/rules?cmd=update&rid=${rule.rid}">${rule.rname}</a>
						</td>
						<td class="b_td2"  style="background-color: #fff;">
						 <img src="${img_ctx }/114.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=update&rid=${rule.rid}">修改</a>
						 &nbsp;|&nbsp;
						 <img src="${img_ctx }/083.gif" width="14" height="14" />&nbsp;<a href="${ctx }/rules?cmd=delete&rid=${rule.rid}" onclick="return del();">删除</a>
						</td>
					</tr>
		      </c:forEach>
		       </table>
		 		</td>
				</tr>
		  </c:forEach>
		 </table>
		 </td>
		 </tr>
	  </c:forEach>
	  </table>
	  </td>
	  </tr>
	</c:forEach>
	</c:if>
	
	<c:if test="${empty navlist}">
		<tr>
			<td colspan="6">
				没有找到相应的记录
			</td>
		</tr>
	</c:if>

</table>
<%@ include file="../../common/footer.jsp"%>
</body>
</html>
